﻿@model NOSDC.Areas.Admin.Models.EventsViewModel

@{
    ViewBag.Title = "Index";
}

<h2>Event Listing</h2>

<p>
    @Html.ActionLink("Create a new event", "Create")
</p>

@foreach (var item in Model.Events) {
    <div style="padding:10px 10px 20px 10px;background-color:#F7F7F7;">
        <div class="eventTitle" style="font-weight:bold;padding-bottom:10px;">
            @Html.ActionLink(item.Title, "Update", new { id = item.EventID })
        </div>
        <div style="padding-bottom:25px;">
            <div class="eventLogo" style="float:left;">
                <img src="@Url.Content("~/Images/Logos/" + @item.Logo)" alt="@item.Logo" />
            </div>
            <div class="eventDescription" style="padding-left:10px;float:left;width:800px;">
                @item.Description
            </div>
        </div>
        <div style="float:right;">
            <div style="">@Html.ActionLink("Add final attendee list.", "Finalize", new {id = item.EventID, isFinal = item.Finalized}) </div>
            <div style=" padding-right:10px;">@Html.ActionLink("Print attendee list.", "PrintAttendees", new {id = item.EventID}) </div>
        </div>
        <div style="clear:both; padding-bottom:10px; padding-top:15px;">
            <div class="eventStart floatLeft" style="padding-right:25px;">
                <strong>Start Date:</strong> @item.StartDate.ToString("MMMM d, yyyy hh:mm")
            </div>
            <div class="eventEnd floatLeft" style="padding-right:25px;">
                <strong>End Date:</strong> @item.EndDate.ToString("MMMM d, yyyy hh:mm")
            </div>
            <div class="eventStatus floatLeft">
                <strong>@NOSDC.Pocos.Status.StatusFlag.GetName(typeof(NOSDC.Pocos.Status.StatusFlag), item.StatusID)</strong>
            </div>
        </div>
    </div>
    <br />
}


